package org.ichow.question.plugins 
{
	import flash.text.TextField;
	import org.ichow.debug.Debug;
	/**
	 * ...
	 * 判断
	 * @author M.ichow
	 */
	public class JudgmentPlugin extends SingleChoicePlugin 
	{
		public static const VERSION:Number = 1.0;
		public static const API:Number = 1.0;
		
		protected var txtName:String = "a_$_txt"
		
		public function JudgmentPlugin() 
		{
			this.propName = "JudgmentPlugin";
		}
		
		override protected function init():void 
		{
			super.init();
			for (var i:int = 0 ; i < options; i++)
			{
				var n : String = txtName.replace( "$" , i );
				var t:TextField = getChild( n ) as TextField;
				if (t) t.text = choiceSigns[i];
			}
		}
		
		override public function check():Boolean 
		{
			if ( choiceTxt == answer[0] )
				return true;
			return false;
		}
	}

}